package com.hj.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 测试
 * @author hj
 */
@RestController
@RequestMapping("/admin")
public class AdminController {


    @PreAuthorize("hasAnyRole('ROLE_admin')")
    @PostMapping("/one")
    public Long test01() {
        return 111L;
    }


}
